package com.sc.sysconfig.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.io.Serializable;
import java.util.List;


/**
 * 系统菜单
 *
 * @author 徐赫阳
 * @date 2021/09/02
 */
@Data
public class SysMenu extends SysBase implements Serializable {

    private static final long serialVersionUID = -12134756846867704L;

    @ApiModelProperty(value="菜单地址")
    private String url;

    @ApiModelProperty(value="菜单名称")
    private String name;

    @ApiModelProperty(value="菜单图标 -- 除1级菜单不生效")
    private String icon;

    @ApiModelProperty(value="菜单描述")
    private String menuDesc;

    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty(value="父级菜单id")
    private Integer parent;

    @ApiModelProperty(value="菜单排序")
    private Integer menuOrder;

    @TableLogic(value = "0",delval = "1")
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value="删除标识 -- 自动填充 0正常 1删除")
    private Integer isDel;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value="启用状态 字典表COMMON_STATUS_DICT")
    private Integer status;

    @TableField(exist = false)
    @ApiModelProperty(value="子菜单")
    private List<SysMenu> children;

    @ApiModelProperty(value="是否显示")
    private Integer isShow;

    @ApiModelProperty(value="是否缓存")
    private Integer keepAlive;

    @ApiModelProperty(value="组件地址")
    private String component;

    @ApiModelProperty(value="组件名称")
    private String pageName;

    @ApiModelProperty(value="编码")
    private String code;

    @ApiModelProperty(value="类型 1菜单 2按钮")
    private Integer type;

    @TableField(exist = false)
    @ApiModelProperty(value="按钮")
    private String buttons;

}
